{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Dynamic Process: Robustness to the Share of Updating Voters (with CW) (C.2)" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "ExecuteTime": { "end_time": "2021-02-09T13:45:45.469003Z", "start_time": "2021-02-09T13:45:39.185427Z" } }, "outputs": [], "source": [ "import numpy as np\n", "import pandas as pd\n", "from matplotlib import pyplot as plt\n", "from poisson_approval import *" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "ExecuteTime": { "end_time": "2021-02-09T13:45:45.479931Z", "start_time": "2021-02-09T13:45:45.474307Z" } }, "outputs": [], "source": [ "N_SAMPLES = 10000\n", "N_MAX_EPISODES = 1000" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "ExecuteTime": { "end_time": "2021-02-09T13:45:45.519824Z", "start_time": "2021-02-09T13:45:45.485914Z" } }, "outputs": [], "source": [ "update_ratios = {\n", " '1': 1,\n", " '0.5': 0.5,\n", " 'one_over_log_log_t_plus_fourteen': one_over_log_log_t_plus_fourteen,\n", " 'one_over_log_t_plus_one': one_over_log_t_plus_one,\n", " 'one_over_sqrt_t': one_over_sqrt_t,\n", " 'one_over_t': one_over_t, \n", "}" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "ExecuteTime": { "end_time": "2021-02-09T13:45:45.534344Z", "start_time": "2021-02-09T13:45:45.523812Z" } }, "outputs": [], "source": [ "rand_profile = RandConditional(\n", " RandProfileHistogramUniform(n_bins=1), \n", " test=is_condorcet, n_trials_max=None\n", ")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Condorcet consistency:" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "ExecuteTime": { "end_time": "2021-02-09T13:45:50.392888Z", "start_time": "2021-02-09T13:45:45.538641Z" } }, "outputs": [ { "data": { "text/html": [ "
\n", " | Approval | \n", "Plurality | \n", "Anti-plurality | \n", "
---|---|---|---|
Share of updating voters | \n", "\n", " | \n", " | \n", " |
1 | \n", "0.997838 | \n", "0.6670 | \n", "0.102871 | \n", "
0.5 | \n", "0.999552 | \n", "0.6697 | \n", "0.267519 | \n", "
one_over_log_log_t_plus_fourteen | \n", "0.999749 | \n", "0.6730 | \n", "0.257903 | \n", "
one_over_log_t_plus_one | \n", "0.999908 | \n", "0.6628 | \n", "0.496961 | \n", "
one_over_sqrt_t | \n", "0.999800 | \n", "0.6697 | \n", "0.570528 | \n", "
one_over_t | \n", "0.999700 | \n", "0.6573 | \n", "0.603082 | \n", "